Fix theme picker rendering the border colour as a fill - #624
Merged
Conversation
The Theme picker drew as a grey block instead of a grid of cells. ThemePickerRow uses a seam trick: a `gap-px` grid whose PARENT is painted with the border colour, so only the 1px gaps show it. That depends on every cell being opaque. The cells used `bg-row-bg` and `bg-row-selected-bg`, and both of those tokens are deliberately see-through — `transparent`, and a 15% accent mix against `transparent`. So the parent's border colour flooded every cell, and the picker rendered with the border colour used as a fill. Both are correct defaults for an ordinary row sitting on a panel; they are just wrong under a parent painted with the border colour. `bg-row-hover-bg` was always opaque (`--theme-surface-hi`), which is why hover was the one state that looked right, and the selected cell only looked plausible because a 15% tint over grey still reads as tinted. Cells now name opaque tokens explicitly rather than depending on tokens whose own definition documents them as transparent: `bg-panel-bg` for the resting state, and a new `--theme-row-selected-solid-bg` that mixes the same 15% accent against `--theme-surface` instead of `transparent`. Both derive from roles Custom Appearance already exposes, so custom themes keep tuning it. The new token is deliberately NOT added to the customAppearance role map: it is a derived companion to an existing role, not a new role to configure. ThemePickerRow is the only component using this seam pattern, so the blast radius is one file plus the token. Verified: tsc clean on both projects, 1721 tests / 251 files green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Theme picker drew as a grey block instead of a grid of cells.
Cause
ThemePickerRow.tsx:46uses a seam trick — agap-pxgrid whose parent is painted with the border colour, so only the 1px gaps show it:That depends on every cell being opaque. They weren't:
--theme-row-bgtransparent--theme-row-selected-bgcolor-mix(… accent 15%, transparent)--theme-row-hover-bgvar(--theme-surface-hi)So the border colour was being used as a fill across the whole picker.
Both leaking tokens are correct defaults for an ordinary row sitting on a panel. They are simply wrong under a parent painted with the border colour.
Fix
The component now names opaque tokens explicitly, rather than depending on tokens whose own definition documents them as transparent:
bg-panel-bg--theme-row-selected-solid-bg, the same 15% accent mixed against--theme-surfaceinstead oftransparentBoth derive from roles Custom Appearance already exposes (
accent,surface,panelBg), so custom themes keep tuning it.The new variable is deliberately not added to the
customAppearancerole map — it is a derived companion to an existing role, not a new role to configure.Blast radius
ThemePickerRowis the only component using this seam pattern (greppedgap-pxandbg-panel-border), so this is one file plus one token.Verification
tscclean on both projects, 1721 tests / 251 files green.Not visually confirmed in a running app — the change is a token swap reasoned from the CSS.
🤖 Generated with Claude Code